<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<style>
  div{
    width: 300px;
    background-color: rgba(0,0,0,0.3);
    padding:10px;
    position:relative;
  }
  input{
    width: 220px;
    padding:10px 60px 10px 20px ;
    border: none;
  }
  img{
      position: absolute;
      top: 14px;
      right: 40px;
  }
  p{
      margin: 0;
      font-size: 12px;
      color: red;
  }
</style>
<body>
<div>
  <input type="text" palaceholder = "请输入用户名">
  <img src="http://doc.canglaoshi.org/tstore_v1/images/login/yhm.png" >
  <p>用户名不能为空！</p>
</div>

</body>
</html>